﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Runtime.InteropServices.JavaScript.JSType;

namespace LightCAD.Core
{
   public class Viewport:LcadObject
    {
        public string Name { get; set; }

        /// <summary>
        /// 指定圆、弧和椭圆的平滑度。
        /// </summary>
        /// <remarks>正整数从 1 到 20,000.</remarks>
        public int ArcSmoothness { get; set; }

        public Vector2d Center { get; set; }

        public Vector2d Direction { get; set; }
        public bool GridOn { get; set; }
        public string Handle { get; set; }
        public double Height { get; set; }
        public Vector2d LowerLeftCorner { get; set; }
        public bool OrthoOn { get; set; }
        public Vector2d SnapBasePoint { get; set; }
        public bool SnapOn { get; set; }
        public double SnapRotationAngle { get; set; }

        public Vector2d Target { get; set; }
        public bool UCSIconAtOrigin { get; set; }

        public bool UCSIconOn { get; set; }
        public Vector2d UpperRightCorner { get; set; }
        public double Width { get; set; }

        public double Zoom { get; set; }

    }

    public class ViewportCollection : KeyedCollection<string, Viewport>
    {
        protected override string GetKeyForItem(Viewport item)
        {
            return item.Name;
        }
    }
}
